//
//  PhotoFrameLandscapeViewController.h
//  PhotoFrame
//
//  Created by William on 11-5-5.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>

@class CalendarObjectDTO;
@interface PhotoFrameLandscapeViewController : UIViewController {
	CalendarObjectDTO *calendarObject;
	CalendarObjectDTO *lastMonthCalendarObject;
	NSCalendar *calendar;
	NSTimer *minuteTimer;
	UIImageView *ampmImageView;
	UIImageView *hoursImageView;
	UIImageView *minutesImageView;
	UIImageView *monthsImageView;
	UILabel *yearLabel;
	UIImageView *colonImageView;
	UIImageView *photoImageView;
	
	NSMutableArray *weekdayImageViewCache;
	NSMutableArray *dayImageViewCache;
	NSMutableArray *dayCache;
	int lastDayCache;
	BOOL colonStatus;
}
@property(retain, nonatomic) CalendarObjectDTO *calendarObject;
@property(retain, nonatomic) CalendarObjectDTO *lastMonthCalendarObject;
@property (nonatomic, retain) NSCalendar *calendar;
@property (nonatomic, assign) NSTimer *minuteTimer;
@property (nonatomic, assign) IBOutlet UIImageView *ampmImageView;
@property (nonatomic, assign) IBOutlet UIImageView *hoursImageView;
@property (nonatomic, assign) IBOutlet UIImageView *minutesImageView;
@property (nonatomic, assign) IBOutlet UIImageView *monthsImageView;
@property (nonatomic, assign) IBOutlet UILabel *yearLabel;
@property (nonatomic, assign) IBOutlet UIImageView *colonImageView;
@property (nonatomic, assign) IBOutlet UIImageView *photoImageView;

@property (nonatomic, retain) NSMutableArray *weekdayImageViewCache;
@property (nonatomic, retain) NSMutableArray *dayImageViewCache;
@property (nonatomic, retain) NSMutableArray *dayCache;
@property (nonatomic, assign) int lastDayCache;
@property (nonatomic, assign) BOOL colonStatus;

- (void) setTime;
- (void) setDate;
- (void) setMonth;
- (void) setYear;

- (BOOL) isToday:(CalendarObjectDTO *)dto thatDay:(int)day;
- (BOOL) isHoliday:(int)weekday;
- (int) getPhotoSerialNum:(int)weekday;
- (NSString*) getPhotoPrefix:(BOOL)isToday isHoliday:(BOOL)isHoliday;

@end
